package inseniarlingua.lang.en;

import inseniarlingua.lang.VerbDef;

public class VerbEngDef extends VerbDef 
{
	private String past;
	private String perfect;
	private String present3rdPersonSingular;

	private String prestentParticiple;
	
	public VerbEngDef() {
		super();
	}
	
	public VerbEngDef(String value) {
		super(value);
	}

	public VerbEngDef(String inf, String past, String perfect, String trdPersonSingular, String prestentParticiple) {
		super(inf);
		this.past = past;
		this.perfect = perfect;
		this.present3rdPersonSingular = trdPersonSingular;
		this.prestentParticiple = prestentParticiple;
	}

	@Override
	public String getPresentParticiple() {
		String ret;
		if (prestentParticiple != null) {
			ret = prestentParticiple;
		}
		else {
			String val = getValue();
			if (val.endsWith("e")) {
				val = val.substring(0, val.length()-1);
			}
			ret = val + "ing";
		}
		return ret;
	}
	
//	@Override
//	public String getInfinitive() {
//		return "to " + super.getInfinitive();
//	}

	@Override
	public String getPastParticiple() {
		return null;
	}
	
	public String getPresent3rdPersonSingular() {
		String ret = (present3rdPersonSingular!=null) ? present3rdPersonSingular : getValue()+"s";
		return ret;
	}
	
	public String getPresent2rdPerson() {
		String ret = ("be".equalsIgnoreCase(getValue())) ? "are" : getPresent();
		return ret;
	}
	
	public String getPast3rdPersonSingular() {
		String ret = ("be".equalsIgnoreCase(getValue())) ? "was" : getPast();
		return ret;
	}

	@Override
	public String getPresent() {
		String ret = getValue();
		return ret;
	}

	@Override
	public String getPast() {
		String suffix = (getValue().endsWith("e")) ? "d" : "ed";
		String ret = (past!=null) ? past : getValue()+suffix;
		return ret;
	}

	@Override
	public String getFuture() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getPerfect() {
		String ret = (perfect!=null) ? perfect : getPast();
		return ret;
	}

	@Override
	public String getPluperfect() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getFuturePerfect() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getConditional() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getImperative() {
		// TODO Auto-generated method stub
		return null;
	}
}
